import 'package:flutter/material.dart';


class BaseWidget extends StatelessWidget {
  final Widget child;
  final Widget? backgroundChild;

  const BaseWidget({super.key, required this.child, this.backgroundChild});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        extendBodyBehindAppBar: true,
        body: Stack(children: [
          backgroundChild ??
              Container(
                decoration: const BoxDecoration(
                    gradient: LinearGradient(
                        colors: [Colors.white, Colors.white],
                        begin: Alignment.topCenter,
                        end: Alignment.bottomCenter)),
              ),
          WillPopScope(
              onWillPop: () async {
                return true;
              },child: SafeArea(child: child))
        ]));
  }
}
